<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            margin: 0 auto;
            overflow: hidden;
            background-color: #ccc;
        }
        .box::after{
            display: block;
            content: '';
            width: 100%;
            height: 100%;
            background-color: pink;
            transition: all 0.8s;
            transform-origin: left bottom;
            transform: rotate(90deg);
        }
        .box:hover::after{
            transform: rotate(0deg);
        }
    </style>
</head>
<body>
    <div class="box">

    </div>
</body>
</html>